package com.heima.apis.wemedia;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import com.heima.model.wemedia.dtos.SensitiveDto;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("leadnews-wemedia")
public interface ISwemediaSensitiveClient {

    //删除敏感词
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public ResponseResult deleteSensitive(@PathVariable("id") Integer id);


    //查询列表
    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult getList(@RequestBody SensitiveDto dto);


    //保存敏感词
    @PostMapping("/api/v1/sensitive/save")
    public ResponseResult getSave(@RequestBody WmSensitive wmSensitive);


    //修改
    @PostMapping("/api/v1/sensitive/update")
    public ResponseResult getUpdate(@RequestBody WmSensitive wmSensitive);

    //查询文章列表
    @PostMapping("/api/v1/news/list_vo")
    public ResponseResult listVo(@RequestBody NewsAuthDto dto);

    //查询文章详情
    @GetMapping("/api/v1/news/one_vo/{id}")
    public ResponseResult oneVo(@PathVariable("id") Integer id);


    //审核文章之审核失败
    @PostMapping("/api/v1/news/auth_fail")
    public ResponseResult authFail(@RequestBody NewsAuthDto dto);


    //审核文章之审核成功
    @PostMapping("/api/v1/news/auth_pass")
    public ResponseResult authPass(@RequestBody NewsAuthDto dto);

}
